<!--
 * @Description: 
 * @Author: 47
 * @Date: 2022-12-28 16:54:06
 * @LastEditors: 47
 * @LastEditTime: 2023-01-05 21:33:24
-->
<template>
    <div class="exam-ing">
        <!-- 导航栏 -->
        <van-nav-bar title="2022年秋季形势与政策考试" left-arrow @click-left="onClickLeft" />

        <AnswerSheet :obj="testDetailObj"/>
    </div>
</template>

<script setup>
// 引入路由
import {useRouter,useRoute} from 'vue-router'
// 引入仓库
import { useCourseStore } from '@/stores/course'
import { onMounted } from '@vue/runtime-core'
import { storeToRefs } from 'pinia'
//实例化仓库对象
const course = useCourseStore()
//解构方法
const { getCourseTestDetail } = course
//解构数据(如果想要处理响应式数据，使用storeToRefs)
const { testDetailObj } = storeToRefs(course)


// 创建路由对象
const router = useRouter()
const route = useRoute()


const testId =  route.params.testId

onMounted(() => {
  getCourseTestDetail(testId)
})



// 返回上一级
const onClickLeft = () => {
  history.back()
}

</script>

<style scoped lang="less">
.exam-ing{
    :deep(.van-nav-bar)  {
        width: 100%;
        position: fixed;
    
         .van-nav-bar__title{
        // font-family: "Calibri";
        font-size: 16px;
        font-weight: 600;
        }
    }
}
</style>